﻿using Stee.CAP8.MessageBus.Sagas.Core.Sagas;
using System;
using System.Collections.Generic;
using System.Reflection.Emit;

namespace Stee.CAP8.MessageBus.Sagas.Order.Sagas.Data
{
    public class OrderSagaData : ISagaData
    {

        #region 子事务Action信息
        public string PaymentAction = "PaymentSub.Payment";
        public string PaymentActionUndo = "PaymentSub.Payment.UNDO";
        public string StockAdjustAction = "StockSub.StockAdjust";
        #endregion

        public bool OrderCreated { get; set; }
        public bool OrderPaymented { get; set; }
        public bool OrderStockAdjusted { get; set; }




        /// <summary>
        /// saga是否完毕
        /// </summary>
        public bool IsDone => OrderCreated && OrderPaymented && OrderStockAdjusted;

        public bool IsError { get; set; }

        public bool IsTimeOut { get; set; }




        public int Revision { get; set; }
    }


}
